package cz.muni.fi.pa165.languageschool.dao;

import cz.muni.fi.pa165.languageschool.Course;
import cz.muni.fi.pa165.languageschool.Lecture;
import java.util.List;

/**
 * Interface of Data Access Object managing Course entities state within data
 * storage
 *
 * @author Michal Fučík (395624) michal.fuca.fucik(at)gmail.com, Milos petrovic
 * (2456790) mpetrovickg(at)gmail.com
 */
public interface CourseDao {

    /**
     * Creates and persist new Course
     *
     * @param course
     */
    void createCourse(Course course);

    /**
     * Returns a list of all courses
     *
     * @return list of courses
     */
    List<Course> getAllCourses();

    /**
     * Returns one single Course entity, associated with given identifier
     *
     * @param id
     * @return
     */
    Course getCourse(Long id);

    /**
     * Updates state of given Course within database, if exist
     *
     * @param course
     * @return course
     */
    Course updateCourse(Course course);

    /**
     * Delete appropriate course
     *
     * @param course
     */
    void deleteCourse(Course course);

    /**
     * Returns a list of lectures related to given Course
     *
     * @param crs
     * @return set of lectures
     */
    List<Lecture> getCourseRelatedLectures(Course crs);
}
